home *** CD-ROM | disk | FTP | other *** search
/ Video Toaster 4.2 / Video Toaster v4.2.iso / arexx / switcher / genlockcmd.rexx < prev    next >
OS/2 REXX Batch file  |  1993-12-13  |  2KB  |  117 lines

  1. /* Demonstrate Toaster Genlock Utility qua ARexx command host */
  2.  
  3. options RESULTS    /* Ask ARexx to pass command results along to us */
  4.  
  5. /*  Build a handy-dandy array of commands to loop through automagically */
  6. cmd.1='M001'       /*  Set Program (Main) output */
  7. cmd.2='M002'
  8. cmd.4='M003'
  9. cmd.3='M004'
  10. cmd.5='MDV1'
  11. cmd.6='MDV2'
  12. cmd.7='MGEN'       /*  Key Amiga graphics on Program out */
  13. cmd.8='MRGB'       /*  Place NTSC encoded Amiga graphics on Program out */
  14. cmd.9='TAKE'       /*  Do a 'Take' to switch Program and Preview */
  15. cmd.10='AUTO'      /*  Smooth dissolve between program and preview */
  16. cmd.11='P001'      /*  Set Preview output */
  17. cmd.12='P002'
  18. cmd.14='P003'
  19. cmd.13='P004'
  20. cmd.15='PDV1'
  21. cmd.16='PDV2'
  22. cmd.17='PGEN'       /*  Key Amiga graphics on Preview out */
  23. cmd.18='PRGB'       /*  Place NTSC encoded Amiga graphics on Preview out */
  24. cmd.19='SLOW'       /*  Set AUTO transition speed */
  25. cmd.20='MEDM'
  26. cmd.21='FAST'
  27. cmd.22='TBAR'       /* Move TBAR up or down by amount specified i.e TBAR '-50' */
  28. cmd.23='RBUP'       /* Release Right Mouse button after TBAR moves to refresh Preview  */
  29. cmd.24='QUIT'       /* Exit Genlock Utility */
  30.  
  31.  
  32. address GENLOCK_REXX_PORT   /* Send commands to the port named "GENLOCK_REXX_PORT" */
  33.  
  34. do i=1 to 23
  35.   interpret cmd.i         /* Interpret! This is the coolest thing about ARexx! */
  36.   say "command: "cmd.i"  Return Code: "RC"  Result: "RESULT
  37.   end
  38.  
  39. MDV1
  40. PDV2
  41.  
  42. do i=0 to 255
  43.     say tbar i
  44.     tbar 1         /* Step TBar down 1 */
  45.     end
  46. say "Hit return"
  47. Pull arg1
  48. do i=0 to 255
  49.     say tbar 500-i
  50.     tbar '-1'      /* Step T-Bar up 1, use quotes so ARexx doesn't think we're subtracting */
  51.     end
  52. say "Hit return"
  53. Pull arg1
  54. RBUP
  55.  
  56. exit
  57.  
  58. MDV1
  59. PDV2
  60. PGEN
  61. say "Hit return"
  62. Pull arg1
  63.  
  64. SLOW
  65. AUTO
  66. say "Hit return"
  67. Pull arg1
  68.  
  69. MEDM
  70. AUTO
  71. say "Hit return"
  72. Pull arg1
  73.  
  74. FAST
  75. AUTO
  76. say "Hit return"
  77. Pull arg1
  78.  
  79. /* TBAR movement is relative, not absolute */
  80.  
  81. TBAR 50
  82. say "Hit return"
  83. Pull arg1
  84. TBAR 50
  85. say "Hit return"
  86. Pull arg1
  87. TBAR 160
  88.  
  89. say "Hit return"
  90. Pull arg1
  91. RBUP
  92.  
  93. say "Hit return"
  94. Pull arg1
  95. TBAR 50
  96. say "Hit return"
  97. Pull arg1
  98. TBAR 50
  99. say "Hit return"
  100. Pull arg1
  101. TBAR 160
  102.  
  103. /* until you say RBUP, it's like holding the RMB down and dragging */
  104. say "Hit return"
  105. Pull arg1
  106. RBUP
  107.  
  108. say "Hit return"
  109. Pull arg1
  110. /* Uncomment the 'QUIT' line to quit the genlock utility, but remember:
  111.    It's not polite to quit a program you didn't start! */
  112. /* QUIT */
  113.  
  114. say    Result
  115.  
  116. say 'Exiting'
  117.